package com.nine.mymall.ware.fegin;

import com.nine.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author: duonine
 * @date: 2021/10/9
 */
//@FeignClient("mymall-product")
@FeignClient("mymall-gateway")
public interface ProductFeginService {

    /**
     *
     * fegin 调用的两种方式
     * 1、不过网关
     *      @FeignClient("mymall-product")
     *      /product/skuinfo/info/{skuId}
     * 2、走网关
     *      @FeignClient("mymall-gateway")
     *      /api/product/skuinfo/info/{skuId}
     *
     * @param skuId
     * @return
     */
    //@RequestMapping("/product/skuinfo/info/{skuId}")
    @RequestMapping("/api/product/skuinfo/info/{skuId}")
    R info(@PathVariable("skuId") Long skuId);

}
